<include file="public@header" />
<style>
	html{background-color: #fff}
</style>
</head>
<body>
<form method="post" class="layui-form js-ajax-form" action="{:url('link/addPost')}" style="padding: 20px 30px 0 0;">
	<div class="layui-form-item">
		<label for="input-name" class="layui-form-label"><span class="form-required">*</span>名称</label>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" id="input-name" required lay-verify="required" name="name">
		</div>
	</div>
	<div class="layui-form-item">
		<label for="input-url" class="layui-form-label"><span class="form-required">*</span>链接地址</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="input-url" required lay-verify="required" name="url">
		</div>
	</div>
	<div class="layui-form-item">
		<label for="input-image" class="layui-form-label">图标</label>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" id="input-image" name="image">
		</div>
		<div class="layui-input-inline layui-btn-container" style="width: auto;">
			<a href="javascript:uploadOneImage('图片上传','#input-image');" class="layui-btn layui-btn-primary"
			   style="border: 1px dashed #e2e2e2;">
				<i class="layui-icon" style="color: #2d8cf0;"></i>上传图片
			</a>
		</div>
	</div>
	<div class="layui-form-item">
		<label for="input-target" class="layui-form-label">打开方式</label>
		<div class="layui-input-inline">
			<select class="layui-input" name="target" id="input-target">
				<foreach name="targets" item="vo">
					<option value="{$key}">{$vo}</option>
				</foreach>
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label for="input-description" class="layui-form-label">描述</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" name="description" id="input-description" ></textarea>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button type="submit" class="layui-btn js-ajax-submit js-close" id="js-ajax-submit">{:lang('ADD')}</button>
		</div>
	</div>
</form>
<include file="public@script"/>
</body>
</html>